﻿<UserControl x:Class="EditCategory"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d"
      xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
      d:DesignHeight="300" d:DesignWidth="800" DataContextChanged="Page_DataContextChanged_1">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="TextBlock" x:Key="HeaderStyle">
                <Setter Property="FontSize" Value="{StaticResource HeaderFontSize}"/>
                <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
            </Style>
            <Style TargetType="TextBlock" x:Key="SubHeaderStyle">
                <Setter Property="FontSize" Value="{StaticResource SubHeaderFontSize}"/>
                <Setter Property="FontFamily" Value="{StaticResource HeaderFontFamily}"/>
            </Style>
            <Style TargetType="TextBlock" x:Key="ContentStyle">
                <Setter Property="FontSize" Value="{StaticResource NormalFontSize}"/>
                <Setter Property="FontFamily" Value="{StaticResource ContentFontFamily}"/>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>
    <StackPanel>
        <TextBlock Style="{StaticResource HeaderStyle}" Text="Kategorie bearbeiten"/>
        <TextBlock Style="{StaticResource SubHeaderStyle}" >
           Sie bearbeiten die Kategorie: <Run Name="r1"/>
        </TextBlock>
        <TabControl Name="tabcontrol1">
            <TabItem Header="Umbennen">
                <StackPanel>
                    <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                        <TextBlock Style="{StaticResource ContentStyle}" Text="Kategorie umbennen:" VerticalAlignment="Center"/>
                        <TextBox Width="300" Margin="10,0,0,0" Name="tb_rename"/>
                    </StackPanel>
                    <CheckBox Content="Auch bei allen betroffenen Artikeln die Kategorieumbennung durchführen" Margin="0,10,0,0" Name="cb_renameOnArticle"/>
                    <Button Width="200" Content="Durchführen" Margin="0,10,0,0" HorizontalAlignment="Left" Click="Button_Click_1"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Verschieben" Margin="10,0,-10,0" IsEnabled="False">
                <StackPanel>
                    <TextBlock Style="{StaticResource ContentStyle}" Text="Wählen Sie links die neue übergeordnete Kategorie aus." VerticalAlignment="Center"/>
                    <CheckBox Content="Auch bei allen betroffenen Artikeln die Kategorieverschiebung durchführen" Margin="0,10,0,0" Name="cb_move"/>
                    <Button Width="200" Content="Durchführen" Margin="0,10,0,0" HorizontalAlignment="Left" Click="Button_Click_2"/>
                </StackPanel>
            </TabItem>
            <TabItem Header="Löschen" Margin="10,0,-10,0">
                <StackPanel>
                    <CheckBox Content="Alle betroffenen Artikel in die übergeordnete Kategorie verschieben?" Margin="0,10,0,0" Name="cb_remove"/>
                    <Button Width="200" Content="Durchführen" Margin="0,10,0,0" HorizontalAlignment="Left" Click="Button_Click_3"/>
                </StackPanel>
            </TabItem>
        </TabControl>
        <Button Width="200" Content="Zurück" Margin="5,10,0,0" HorizontalAlignment="Left" Click="Button_Click_4"/>
    </StackPanel>
</UserControl>
